<script type="text/javascript" src="/public/library/jquery/jquery.form.js"></script>
<script src="/public/library/hvn/place.js" type="text/javascript"></script>
<script src="/public/library/hvn/event.search.js" type="text/javascript"></script>
<script src="/public/library/hvn/tour.js" type="text/javascript"></script>
<script src="/public/library/jquery/thickbox/jquery.DOMWindow.js" type="text/javascript"></script>
<link type="text/css" href="/public/library/jquery/calendar/excite-bike/ui.all.css" rel="stylesheet" media="screen" />
<link rel="stylesheet" href="/public/library/jquery/calendar/excite-bike/jquery-ui-1.7.1.custom.css" type="text/css" media="screen" />

<script type="text/javascript" src="/public/library/jquery/calendar/amlich.js"></script>
<script type="text/javascript" src="/public/library/jquery/calendar/ui.core.js"></script>
<script type="text/javascript" src="/public/library/jquery/calendar/ui.datepicker.js"></script>
<script type="text/javascript" src="/public/library/jquery/calendar/ui.datepicker-lang.js"></script>

<script type="text/javascript" >
	$(function(){
		//check value
		$("#form_tour_search").submit(function(){
		    if ($("#price").val() > $("#to_price").val() || $("#departure_date").val() > $("#return_date").val()
		    	|| $("#duration_start").val() > $("#duration_finish").val())
		    {
		        alert("wrong fee range!");
		        return false;
		    }
		    else
		        return true;
		});
		
		getType();
	});
	
    function populate_category_checkboxes()
        {
                <?if(!empty($this->type)):?>
                <?foreach ($this->type as $t) :?>
                        $("input:checkbox[name=type[]]").filter("[value=<?=$t?>]").trigger("click");
                <?endforeach?>
                <?endif?>
        }
</script>
<form id = "form_tour_search" accept-charset="UTF-8" action="<?= $this->escape($this->form->getAction()) ?>"
      method="<?= $this->escape($this->form->getMethod()) ?>">
<br/>
<?=t(810) ?>: <?=$this->form->name?>
<br/>
<?=t(811) ?> :<?=$this->form->price?> &nbsp;&nbsp; <?=t(817) ?>: <?=$this->form->to_price?>
<br/>
<?=t(812) ?> : <?=$this->form->price_currency?>
<?=t(816) ?> : <?=$this->form->category_tour?>
<br/>
<?=t(818) ?>:<?=$this->form->departure_date; ?> <?=t(815) ?>:<?=$this->form->return_date; ?> 
<br/>
<?=t(819) ?>:<?=$this->form->duration_start?>  <?=t(18) ?>:<?=$this->form->duration_finish?> (hours)
<br/>
<?if(isset($this->form->poster_id)):?>
<?=t(83) ?>  :<?=$this->form->poster_id?>
<br/>
<?=t(84) ?> : <?=$this->form->post_time?>
<br/>
<?=t(2) ?> :<?=$this->form->status?>
<?endif?> 
<?=t(820) ?> :<?=$this->form->tours_per_page?>
<br/>


<br/>
<?=$this->form->submit ?> 
</form>      

